package com.hgd.evp.common.biz;

import com.hgd.evp.common.entity.EntityUtil;
import com.hgd.evp.common.mapper.CommonMapper;

import java.lang.reflect.InvocationTargetException;

public class BusinessBiz<M extends CommonMapper<T>, T> extends BaseBiz<M,T>{

    @Override
    public void insertSelectiveBindCrt(T entity) {
        try {
            EntityUtil.initCrtInfo(entity);
            super.insertSelective(entity);
        } catch (InvocationTargetException | IllegalAccessException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void updateSelectiveByIdBindUpd(T entity) {
        try {
            EntityUtil.initUpdInfo(entity);
            super.updateSelectiveById(entity);
        } catch (InvocationTargetException | IllegalAccessException e) {
            e.printStackTrace();
        }
    }
}
